Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

dePolyABT Class Reference

#include <dePolyABT.hpp>

Collaboration diagram for dePolyABT:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ABTSplitMethod {
  Split_NoMethod, Split_SuccessiveApprox, Split_AllVerts, Split_MultiSample,
  Split_Statistical, Split_Count, Split_Force32Bit = 0x7fffffff
}

Public Member Functions

 dePolyABT ()
 ~dePolyABT ()
deBoolean SetCurrentSurface (IdeSurface *CurrSurface)
 surface state machine setting

deBoolean AddVertices (ABTVertex *VertexArray, long NumVerts, long &BaseVertexIndex, const deTransformInfo &worldpos)
 add vertices that will be indexed by faces

deBoolean AddTriangleIndices (long *IndexArray, long BaseVertexIndex, long NumIndices)
 add indices for faces, offset by a value obtained from AddVertices

deBoolean AddSceneObject (IdeSceneObject *pObject)
 handles an entire sceneobject without decomposing it into geometry

deBoolean AddIndexedVBuffer (IdeVertexBuffer *VBuffer, long &BaseVertexIndex, const deTransformInfo &worldpos)
 add raw geometry from a vertex buffer - can be just vertices, just indices, or both

deBoolean AddMeshGeometry (IdeMesh *pMesh, const deTransformInfo &worldpos)
 add the geometry from an IdeMesh object

deBoolean SetMaxLeafTris (long MaxTris)
 set the threshold for maximum triangles in a leaf node. defaults to 50.

deBoolean SetMaxVBufferTris (long MaxTris)
 set the threshold for maximum triangles in a renderable vertex buffer. defaults to 2000.

deBoolean SetSplitWeights (deFloat Axis, deFloat Volume, deFloat FaceBalance, deFloat NumSplit)
deBoolean CompileABT ()
 compile the entire ABT geometry into renderable VBs and leaf nodes

deBoolean RenderVisibleGeometry (IdeSceneGraph::deSceneTraversal *Params)
 render the currently visible geometry, according to the input Params.

void GetVisibleAABB (deAABB &bbox)
 get the AABB extents of the ABT

deBoolean Serialize (IdeFile *File)
deBoolean DeSerialize (IdeFile *File, u32 DataLength, u32 &AmtRead)
deBoolean DeSerializeLoad ()

Private Member Functions

void DestroyABT ()
ABTPartitionCreateABTPartition (ABTPartition *Parent, int ChildNum)
deBoolean DestroyABTPartition (ABTPartition *&pPart)
deBoolean ShrinkPartitionBBoxes (ABTPartition *Parent)
deBoolean ProcessABTPartition (ABTPartition *pPart)
void PickBestSplit (const ABTPartition *pPart, ABTSplitStat &best, ABTSplitMethod method) const
deBoolean ScorePartitionSplit (const ABTPartition *pPart, ABTSplitStat *pStat, deFloat AxisScores[3]) const
deBoolean InterpolateCutEdge (ABTVertex *NewVert, long Index1, long Index2, dePlane &SplitPlane)
deBoolean BuildPartitionVBuffer (ABTPartition *pPart)
deBoolean RenderVisibleABTPartitions (IdeSceneGraph::deSceneTraversal *Params, ABTPartition *CurrentPart, deBoolean AllVisible)
deBoolean RenderABTPartition (IdeSceneGraph::deSceneTraversal *Params, ABTPartition *pPart)
ABTPartitionDecomposeFilePartition (const deTArray< ABTFilePartition_01 > &fileparts, u32 currentIdx, ABTPartition *parent, const deTArray< u32 > objectIndices, const deTArray< ABTFace > faces)

Static Private Member Functions

u32 AppendFilePartition (deTArray< ABTFilePartition_01 > &fileparts, const ABTPartition *current, u32 parentIdx, u32 &TotalFaces, u32 &TotalObjects)

Private Attributes

deTArray< ABTVertexm_Vertices
deTArray< ABTFacem_AllFaces
deTArray< IdeSurface * > m_Surfaces
deTArray< IdeSceneObject * > m_SceneObjects
deAABB m_TotalBBox
deVec3d m_WorldOffset
ABTPartitionm_RootPartition
u32 m_CurrSurfaceIndex
u32 m_OriginalVertNum
u32 m_MaxLeafTris
u32 m_MaxVBTris
deFloat m_SplitWeights [4]
deTArray< deIDPairm_SerialSurfaces
deTArray< deIDPairm_SerialObjects

Member Enumeration Documentation

enum dePolyABT::ABTSplitMethod
 

Enumeration values:
Split_NoMethod 
Split_SuccessiveApprox 
Split_AllVerts 
Split_MultiSample 
Split_Statistical 
Split_Count 
Split_Force32Bit 


Constructor & Destructor Documentation

dePolyABT::dePolyABT  
 

dePolyABT::~dePolyABT  
 


Member Function Documentation

deBoolean dePolyABT::AddIndexedVBuffer IdeVertexBuffer   VBuffer,
long &    BaseVertexIndex,
const deTransformInfo   worldpos
 

add raw geometry from a vertex buffer - can be just vertices, just indices, or both

deBoolean dePolyABT::AddMeshGeometry IdeMesh   pMesh,
const deTransformInfo   worldpos
 

add the geometry from an IdeMesh object

deBoolean dePolyABT::AddSceneObject IdeSceneObject   pObject
 

handles an entire sceneobject without decomposing it into geometry

deBoolean dePolyABT::AddTriangleIndices long *    IndexArray,
long    BaseVertexIndex,
long    NumIndices
 

add indices for faces, offset by a value obtained from AddVertices

deBoolean dePolyABT::AddVertices ABTVertex   VertexArray,
long    NumVerts,
long &    BaseVertexIndex,
const deTransformInfo   worldpos
 

add vertices that will be indexed by faces

u32 dePolyABT::AppendFilePartition deTArray< ABTFilePartition_01 > &    fileparts,
const ABTPartition   current,
u32    parentIdx,
u32   TotalFaces,
u32   TotalObjects
[static, private]
 

deBoolean dePolyABT::BuildPartitionVBuffer ABTPartition   pPart [private]
 

deBoolean dePolyABT::CompileABT  
 

compile the entire ABT geometry into renderable VBs and leaf nodes

dePolyABT::ABTPartition * dePolyABT::CreateABTPartition ABTPartition   Parent,
int    ChildNum
[private]
 

dePolyABT::ABTPartition * dePolyABT::DecomposeFilePartition const deTArray< ABTFilePartition_01 > &    fileparts,
u32    currentIdx,
ABTPartition   parent,
const deTArray< u32   objectIndices,
const deTArray< ABTFace   faces
[private]
 

deBoolean dePolyABT::DeSerialize IdeFile   File,
u32    DataLength,
u32   AmtRead
 

deBoolean dePolyABT::DeSerializeLoad  
 

void dePolyABT::DestroyABT   [private]
 

deBoolean dePolyABT::DestroyABTPartition ABTPartition *&    pPart [private]
 

void dePolyABT::GetVisibleAABB deAABB   bbox
 

get the AABB extents of the ABT

deBoolean dePolyABT::InterpolateCutEdge ABTVertex   NewVert,
long    Index1,
long    Index2,
dePlane   SplitPlane
[private]
 

void dePolyABT::PickBestSplit const ABTPartition   pPart,
ABTSplitStat   best,
ABTSplitMethod    method
const [private]
 

deBoolean dePolyABT::ProcessABTPartition ABTPartition   pPart [private]
 

deBoolean dePolyABT::RenderABTPartition IdeSceneGraph::deSceneTraversal   Params,
ABTPartition   pPart
[private]
 

deBoolean dePolyABT::RenderVisibleABTPartitions IdeSceneGraph::deSceneTraversal   Params,
ABTPartition   CurrentPart,
deBoolean    AllVisible
[private]
 

deBoolean dePolyABT::RenderVisibleGeometry IdeSceneGraph::deSceneTraversal   Params
 

render the currently visible geometry, according to the input Params.

deBoolean dePolyABT::ScorePartitionSplit const ABTPartition   pPart,
ABTSplitStat   pStat,
deFloat    AxisScores[3]
const [private]
 

deBoolean dePolyABT::Serialize IdeFile   File
 

deBoolean dePolyABT::SetCurrentSurface IdeSurface   CurrSurface
 

surface state machine setting

deBoolean dePolyABT::SetMaxLeafTris long    MaxTris
 

set the threshold for maximum triangles in a leaf node. defaults to 50.

deBoolean dePolyABT::SetMaxVBufferTris long    MaxTris
 

set the threshold for maximum triangles in a renderable vertex buffer. defaults to 2000.

deBoolean dePolyABT::SetSplitWeights deFloat    Axis,
deFloat    Volume,
deFloat    FaceBalance,
deFloat    NumSplit
 

set the weighting values for determining split plane locations. sum of all weights should be 1.0, and will be normalized if it is not. recommended to put most weight into FaceBalance to get more adaptive splits, but leave some weight in the others to avoid degenerate splits.

Parameters:
Axis weight towards largest axis
Volume weight towards center of chunk volume
FaceBalance weight towards equal number of faces on each side of split
NumSplit weight away from inducing splits of faces in a node

deBoolean dePolyABT::ShrinkPartitionBBoxes ABTPartition   Parent [private]
 


Member Data Documentation

deTArray<ABTFace> dePolyABT::m_AllFaces [private]
 

u32 dePolyABT::m_CurrSurfaceIndex [private]
 

u32 dePolyABT::m_MaxLeafTris [private]
 

u32 dePolyABT::m_MaxVBTris [private]
 

u32 dePolyABT::m_OriginalVertNum [private]
 

ABTPartition* dePolyABT::m_RootPartition [private]
 

deTArray<IdeSceneObject*> dePolyABT::m_SceneObjects [private]
 

deTArray<deIDPair> dePolyABT::m_SerialObjects [private]
 

deTArray<deIDPair> dePolyABT::m_SerialSurfaces [private]
 

deFloat dePolyABT::m_SplitWeights[4] [private]
 

deTArray<IdeSurface*> dePolyABT::m_Surfaces [private]
 

deAABB dePolyABT::m_TotalBBox [private]
 

deTArray<ABTVertex> dePolyABT::m_Vertices [private]
 

deVec3d dePolyABT::m_WorldOffset [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 12 20:15:41 2005 for Destiny3D by doxygen1.3-rc3